<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>心理健康管理</title>
	<%@ include file="/common/meta.jsp" %>
	<link href="${ctx}/css/table.css" type="text/css" rel="stylesheet"/>
	<script src="${ctx}/js/table.js" type="text/javascript"></script>
	<script src="${ctx}/js/health/psychol.js" type="text/javascript"></script>
	<script src="${ctx}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
	<script src="${ctx}/fusioncharts.com/javascript/FusionCharts.js" type="text/javascript"></script>
	<script type="text/javascript">
	$(document).ready(function(){
		show('${pieXml}',"Pie3D.swf","mychartId","pieChart");
		show('${lineDateXml}',"MSLine.swf","mychartId1","dateChart");
		show('${lineGradeXml}',"MSLine.swf","mychartId2","gradeChart");
	});
	function show(xml,chartUrl,mychartId,id){
		var myChart = new FusionCharts("${ctx}/fusioncharts.com/flash/"+chartUrl, mychartId, "250", "150", "0", "0" );
	 	myChart.setDataXML(xml);
	 	myChart.configure("ChartNoDataText", "暂无数据");
	    myChart.render(id);  
	}
	</script>
</head>
<body>
<div style="font-family:Arial;font-size:15px;font-weight:bold;font-style:normal;align:left">当前位置：健康管理--心里健康管理</div>
	<form id="mainForm" action="psychol.action" method="get">
	<div id="filter">
	<table width="70%" class="noborder">
		<tr>
			<td>职工号/学号：</td><td><input type="text" id="personId" name="personId" size="10" value="${personId}"/></td>
			<td>姓名：</td><td><input type="text" id="personName" name="personName" size="10" /></td>
			<td>适用性别：</td><td><s:select name="personGender" id="gender" style="width:95px" theme="simple"
								   list="#{-1:'全部',0:'男',1:'女'}" listKey="key" listValue="value" value="-1"/></td>
		</tr>
	    <tr>
	    	<td>年龄：</td><td><input type="text" id="age" name="personAge" size="10" value="${personAge}"/></td>
	    	<td>年级：</td><td><input type="text" name="pesonGrade" id="grade" size="10" value="${pesonGrade}" /></td>
			<td>班级：</td><td><input type="text" id="class" name="personClazz" size="10" value="${personClazz}"/></td>
	    </tr>
	    <tr>
	    	<td>班主任：</td><td><input type="text" id="headmaster" name="headmaster" size="10" value="${headmaster}"/></td>
	    	<td>起始时间：</td><td><input type="text" id="startDate" name="startDate" size="10" readonly="readonly" 
								 value="<s:date name='startDate' format='yyyy-MM-dd'/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"/></td>
			<td>结束时间：</td><td><input type="text" id="endDate" name="endDate" size="10" readonly="readonly" 
								 value="<s:date name='endDate' format='yyyy-MM-dd'/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"/></td>
	    </tr>
	    <tr>
			<td>问卷名称：</td><td><s:select name="surveyId" id="surveyId" style="width:95px" theme="simple"
									list="surveyList" listKey="key" listValue="value" /></td>
			<td colspan="2"></td>
			<td colspan="2">
				<input type="submit" value="查询" />
				<input type="button" onclick="clearSearch();" value="重置" />
			</td> 
	   </tr>
    </table>
    </div>
	<p></p><p></p>
	<div id="content">
		<table width="95%" border="1" id="customers">
			<tr>
				<th>操作</th>
				<th>职工号/学号</th>
				<th>姓名</th>
				<th>年级</th>
				<th>问卷名称</th>
				<th>问卷描述</th>
				<th>最后得分</th>
				<th>结果描述</th>
				<th>标准得分</th>
				<th>明细</th>
			</tr>
			<s:iterator value="surveys">
			<tr>
				<td><input type="checkbox" id="checkedResultId" name="resultIds" value="${id}" />&nbsp;</td>
				<td>${person.idNumber}&nbsp;</td>
				<td>${person.name}&nbsp;</td>
				<td>${person.clazz.gradeName}&nbsp;</td>
				<td>${survey.name}&nbsp;</td>
				<td>${survey.description}&nbsp;</td>
				<td>${totalScore}&nbsp;</td>
				<td>${judgment}&nbsp;</td>
				<td>${survey.lowerStdScore}&nbsp;-&nbsp;${survey.upperStdScore}</td>
				<td>
					<a href="psychol!detail.action?resultSurveyId=${survey.id}&resultId=${id}&personName=${person.name}">明细</a>
				</td>
			</tr>
			</s:iterator>
		</table>
	</div>
	<table width="99%">
		<tr>
		<td width="33%"><div id="dateChart"></div></td>
		<td width="33%"><div id="pieChart"></div></td>
		<td width="33%"><div id="gradeChart"></div></td>
		</tr>
	</table>
	<security:authorize ifNotGranted="ROLE_查阅统计报表">
	<fieldset title="" style="width:60%;"><legend title="" align="top">心里健康建议</legend>
	<table>
	<tr>
	<td><s:textarea id="suggest" name="suggest" theme="simple" cols="60" rows="4"/></td>
	<td><input type="button" onclick="proposalSuggest();" value="发送" /><br /><br />
		<input type="button" onclick="clearSuggest();" value="清空" /></td>
	</tr>
	</table>
	</fieldset>
	</security:authorize>
</form>		
</body>
</html>